package cn.mingfancloud.基础知识.java编码基础;

import java.util.Scanner;

public class PrintStringDemo {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一句话，让nextLine()扫描：");
        String nextLineStr = sc.nextLine();
        System.out.println("请输入一句话，让next()扫描：");
        String nextStr = sc.next();
        System.out.println("nextLine()扫描到的结果是：" + nextLineStr);
        System.out.println("next()扫描到的结果是：" + nextStr);
        sc.close();
    }
}
